/*
* @Author: dengjiayao
* @Date:   2017-06-26 09:05:10
 * @Last Modified by: songwh
 * @Last Modified time: 2018-04-11 13:56:45
*/

import Vue from '../vue'
import store from '../vuex/store'
import { alert } from 'vue-strap'
import loginCheck from '../util/login-check'

import ItemList from './item-list-old/item-list.vue'
import ItemConfig from './item-config-old/item-config.vue'

new Vue({
  el: 'body',
  components: {
    'vue-alert-msg': alert,
    'vue-item-list': ItemList,
    'vue-item-config': ItemConfig
  },
  store,
  created() {
    loginCheck(this)
  },
  vuex: {
    getters: {
      msg: state => state.msg
    }
  },
  methods: {
    newItem() {
      var ref = this.$refs.itemConfig
      ref.form = {
        pubDate: '',
        title: '',
        body: '',
        tags: '',
        voiceDuration: '',
        voicePicUrl: '',
        voiceUrl: '',
        speaker: '',
        meetingSummary: ''
      }
      ref.showModal = true
    }
  }
})
